package com.qyhl.module_home.home;

import com.orhanobut.hawk.Hawk;
import com.qyhl.webtv.commonlib.entity.config.AppConfigBean;

/**
 * Created by qyhl on 2017/10/9.
 */

public class HomeModel implements HomeContract.HomeModel {
    private HomePresenter mPresenter;

    HomeModel(HomePresenter mPresenter) {
        this.mPresenter = mPresenter;
    }

    /**
     * 动态配置底部按钮
     */
    @Override
    public void getConfig() {
        if (Hawk.contains("config")) {
            AppConfigBean bean = Hawk.get("config");
            mPresenter.setConfig(bean);
        } else {
            mPresenter.setConfigError();
        }
    }
}
